package com.nts.visionworks.business.streamevent.domain;

// Generated 2013. 6. 23 ���� 6:33:40 by Hibernate Tools 4.0.0

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.Max;

import com.nts.visionworks.core.validation.EntityIdNotNull;

/**
 * StreamSynapseCoefficient generated by hbm2java
 */
@Entity
@Table(name = "stream_synapse_coefficient", catalog = "visionworks")
public class StreamSynapseCoefficient implements java.io.Serializable
{

	private StreamSynapseCoefficientId id;
	private StreamSynapse streamSynapse;
	private String coefficientValue;

	public StreamSynapseCoefficient()
	{
	}

	public StreamSynapseCoefficient(StreamSynapseCoefficientId id,
			StreamSynapse streamSynapse)
	{
		this.id = id;
		this.streamSynapse = streamSynapse;
	}

	public StreamSynapseCoefficient(StreamSynapseCoefficientId id,
			StreamSynapse streamSynapse, String coefficientValue)
	{
		this.id = id;
		this.streamSynapse = streamSynapse;
		this.coefficientValue = coefficientValue;
	}

	@EmbeddedId
	@AttributeOverrides(
	{
			@AttributeOverride(name = "synapseId", column = @Column(name = "SynapseId", nullable = false)),
			@AttributeOverride(name = "coefficientKey", column = @Column(name = "CoefficientKey", nullable = false, length = 30)) })
	public StreamSynapseCoefficientId getId()
	{
		return this.id;
	}

	public void setId(StreamSynapseCoefficientId id)
	{
		this.id = id;
	}

	@EntityIdNotNull(message = "validation.streamSynapseCoefficient.streamSynapse.notNull")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "SynapseId", nullable = false, insertable = false, updatable = false)
	public StreamSynapse getStreamSynapse()
	{
		return this.streamSynapse;
	}

	public void setStreamSynapse(StreamSynapse streamSynapse)
	{
		this.streamSynapse = streamSynapse;
	}

	@Max(message = "validation.streamSynapseCoefficient.coefficientValue.max", value = 1000)
	@Column(name = "CoefficientValue", length = 1000)
	public String getCoefficientValue()
	{
		return this.coefficientValue;
	}

	public void setCoefficientValue(String coefficientValue)
	{
		this.coefficientValue = coefficientValue;
	}

}
